]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Align window previews with the pixel grid
authorSebastian Keller <skeller@src.gnome.org>
Tue, 22 Aug 2017 17:05:11 +0000 (19:05 +0200)
committerSebastian Keller <skeller@src.gnome.org>
Wed, 23 Aug 2017 16:12:09 +0000 (18:12 +0200)
Now that full-sized window previews are allowed again it makes sense to
align the window previews with the pixel grid to prevent unscaled
windows from looking blurry in the overview.

js/ui/workspace.js

index eb24e253870a27dd6488543004584ad6f5fcfb2b..e6a6da919a86796b55e5fb06d3b1999043237294 100644 (file)
@@ -948,6 +948,10 @@ var LayoutStrategy = new Lang.Class({
                 let cloneX = x + (cellWidth - cloneWidth) / 2;
                 let cloneY = row.y + row.height * row.additionalScale - cellHeight + compensation;
 
+                // Align with the pixel grid to prevent blurry windows at scale = 1
+                cloneX = Math.floor(cloneX);
+                cloneY = Math.floor(cloneY);
+
                 slots.push([cloneX, cloneY, s, window]);
                 x += cellWidth + this._columnSpacing;
             }